Deal with domain info going away (handle new error path introduced by
authorshand@ubuntu.eng.hq.xensource.com <shand@ubuntu.eng.hq.xensource.com>
Thu, 15 Sep 2005 04:12:54 +0000 (20:12 -0800)
committershand@ubuntu.eng.hq.xensource.com <shand@ubuntu.eng.hq.xensource.com>
Thu, 15 Sep 2005 04:12:54 +0000 (20:12 -0800)
cset 6828). Believe Dan Smith is working up a more comprehensive patch.

Signed-off-by: Steven Hand <steven@xensource.com>
tools/python/xen/xend/XendDomainInfo.py

index b5929ce88b6eab5c5cc15c6b213c78b74bc3912b..d611bec5a19613691c0a40842ef77072fe4790cf 100644 (file)
@@ -353,7 +353,12 @@ class XendDomainInfo:
     def update(self, info=None):
         """Update with  info from xc.domain_getinfo().
         """
-        self.info = info or dom_get(self.domid)
+        if info:
+            self.info = info
+        else:
+            di = dom_get(self.domid)
+            if not di:
+                return 
         self.memory = self.info['mem_kb'] / 1024
         self.ssidref = self.info['ssidref']